home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / System Extras Headers / AOCE Headers / OCEStandardMail.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-20  |  23.8 KB  |  717 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        OCEStandardMail.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __OCESTANDARDMAIL__
  13. #define __OCESTANDARDMAIL__
  14.  
  15. #ifndef __APPLEEVENTS__
  16. #include <AppleEvents.h>
  17. /*    #include <Types.h>                                            */
  18. /*        #include <ConditionalMacros.h>                            */
  19. /*        #include <MixedMode.h>                                    */
  20. /*            #include <Traps.h>                                    */
  21. /*    #include <Memory.h>                                            */
  22. /*    #include <OSUtils.h>                                        */
  23. /*    #include <Events.h>                                            */
  24. /*        #include <Quickdraw.h>                                    */
  25. /*            #include <QuickdrawText.h>                            */
  26. /*                #include <IntlResources.h>                        */
  27. /*    #include <EPPC.h>                                            */
  28. /*        #include <PPCToolBox.h>                                    */
  29. /*            #include <AppleTalk.h>                                */
  30. /*        #include <Processes.h>                                    */
  31. /*            #include <Files.h>                                    */
  32. /*                #include <SegLoad.h>                            */
  33. /*    #include <Notification.h>                                    */
  34. #endif
  35.  
  36. #ifndef __FILES__
  37. #endif
  38.  
  39. #ifndef __OCEAUTHDIR__
  40. #include "OCEAuthDir.h"
  41. /*    #include "OCE.h"                                            */
  42. /*        #include <Aliases.h>                                    */
  43. /*        #include <Script.h>                                        */
  44. #endif
  45.  
  46. #ifndef __OCEMAIL__
  47. #include "OCEMail.h"
  48. /*    #include "DigitalSignature.h"                                */
  49. /*    #include "OCEMessaging.h"                                    */
  50. /*    #include <TextEdit.h>                                        */
  51. #endif
  52.  
  53. #ifndef __WINDOWS__
  54. #include <Windows.h>
  55. /*    #include <Controls.h>                                        */
  56. /*        #include <Menus.h>                                        */
  57. #endif
  58.  
  59. #ifndef __DIALOGS__
  60. #include <Dialogs.h>
  61. #endif
  62.  
  63. #define kSMPVersion 1
  64.  
  65. #define gestaltSMPMailerVersion 'malr'
  66.  
  67. #define gestaltSMPSPSendLetterVersion 'spsl'
  68.  
  69. #define kSMPNativeFormatName 'natv'
  70.  
  71. #if defined(powerc) || defined (__powerc)
  72. #pragma options align=mac68k
  73. #endif
  74. struct LetterSpec {
  75.     unsigned long                spec[3];
  76. };
  77. #if defined(powerc) || defined(__powerc)
  78. #pragma options align=reset
  79. #endif
  80.  
  81. typedef struct LetterSpec LetterSpec;
  82.  
  83. #define typeLetterSpec 'lttr'
  84.  
  85. /*    Wildcard used for filtering letter types. */
  86.  
  87. enum  {
  88.     FilterAnyLetter                = 'ltr*',
  89.     FilterAppleLetterContent    = 'ltc*',
  90.     FilterImageContent            = 'lti*'
  91. };
  92.  
  93. #if defined(powerc) || defined (__powerc)
  94. #pragma options align=mac68k
  95. #endif
  96. struct LetterDescriptor {
  97.     Boolean                        onDisk;
  98.     union {
  99.         FSSpec                        fileSpec;
  100.         LetterSpec                    mailboxSpec;
  101.     }                            u;
  102. };
  103. #if defined(powerc) || defined(__powerc)
  104. #pragma options align=reset
  105. #endif
  106.  
  107. typedef struct LetterDescriptor LetterDescriptor;
  108.  
  109. /*
  110. SMPPSendAs values.  You may add the following values together to determine how the
  111. file is sent, but you may not set both kSMPSendAsEnclosureMask and kSMPSendFileOnlyMask.  This
  112. will allow you to send the letter as an image so that it will work with fax gateways
  113. and send as an enclosure as well.
  114. */
  115.  
  116. enum  {
  117.     kSMPSendAsEnclosureBit,                /* Appears as letter with enclosures */
  118.     kSMPSendFileOnlyBit,                /* Appears as a file in mailbox. */
  119.     kSMPSendAsImageBit                    /* Content imaged in letter */
  120. };
  121.  
  122. /* Values of SMPPSendAs */
  123. enum  {
  124.     kSMPSendAsEnclosureMask        = 1 << kSMPSendAsEnclosureBit,
  125.     kSMPSendFileOnlyMask        = 1 << kSMPSendFileOnlyBit,
  126.     kSMPSendAsImageMask            = 1 << kSMPSendAsImageBit
  127. };
  128.  
  129. typedef Byte SMPPSendAs;
  130.  
  131. /* Send Package Structures */
  132. typedef pascal void (*SMPDrawImageProcPtr)(long refcon, Boolean inColor);
  133.  
  134. enum {
  135.     uppSMPDrawImageProcInfo = kPascalStackBased
  136.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  137.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Boolean)))
  138. };
  139.  
  140. #if USESROUTINEDESCRIPTORS
  141. typedef UniversalProcPtr SMPDrawImageUPP;
  142.  
  143. #define CallSMPDrawImageProc(userRoutine, refcon, inColor)        \
  144.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSMPDrawImageProcInfo, (refcon), (inColor))
  145. #define NewSMPDrawImageProc(userRoutine)        \
  146.         (SMPDrawImageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSMPDrawImageProcInfo, GetCurrentISA())
  147. #else
  148. typedef SMPDrawImageProcPtr SMPDrawImageUPP;
  149.  
  150. #define CallSMPDrawImageProc(userRoutine, refcon, inColor)        \
  151.         (*(userRoutine))((refcon), (inColor))
  152. #define NewSMPDrawImageProc(userRoutine)        \
  153.         (SMPDrawImageUPP)(userRoutine)
  154. #endif
  155.  
  156. #if defined(powerc) || defined (__powerc)
  157. #pragma options align=mac68k
  158. #endif
  159. struct SMPRecipientDescriptor {
  160.     struct SMPRecipientDescriptor    *next;        /*  Q-Link. */
  161.     OSErr                            result;        /*  result code when using the object. */
  162.     OCEPackedRecipient                *recipient;    /*  Pointer to a Packed Address. */
  163.     unsigned long                    size;        /*  length of recipient in bytes. */
  164.     MailRecipient                    theAddress;    /*  structure points into recipient and theRID. */
  165.     RecordID                        theRID;        /*  structure points into recipient. */
  166. };
  167. #if defined(powerc) || defined(__powerc)
  168. #pragma options align=reset
  169. #endif
  170.  
  171. typedef struct SMPRecipientDescriptor SMPRecipientDescriptor;
  172.  
  173. typedef SMPRecipientDescriptor *SMPRecipientDescriptorPtr;
  174.  
  175. #if defined(powerc) || defined (__powerc)
  176. #pragma options align=mac68k
  177. #endif
  178. struct SMPEnclosureDescriptor {
  179.     struct SMPEnclosureDescriptor *next;
  180.     OSErr                        result;
  181.     FSSpec                        fileSpec;
  182.     OSType                        fileCreator;    /*  Creator of this enclosure. */
  183.     OSType                        fileType;        /*  File Type of this enclosure. */
  184. };
  185. #if defined(powerc) || defined(__powerc)
  186. #pragma options align=reset
  187. #endif
  188.  
  189. typedef struct SMPEnclosureDescriptor SMPEnclosureDescriptor;
  190.  
  191. typedef SMPEnclosureDescriptor *SMPEnclosureDescriptorPtr;
  192.  
  193. #if defined(powerc) || defined (__powerc)
  194. #pragma options align=mac68k
  195. #endif
  196. struct SMPLetterPB {
  197.     OSErr                        result;            /* result of operation */
  198.     RStringPtr                    subject;        /* RString */
  199.     AuthIdentity                senderIdentity;    /* Letter is sent from this Identity */
  200.     SMPRecipientDescriptorPtr    toList;            /* Pointer to linked list */
  201.     SMPRecipientDescriptorPtr    ccList;            /* Pointer to linked list */
  202.     SMPRecipientDescriptorPtr    bccList;        /* Pointer to linked list */
  203.     ScriptCode                    script;            /* Identifier for language */
  204.     Size                        textSize;        /* length of body data */
  205.     Ptr                            textBuffer;        /* body of the letter */
  206.     SMPPSendAs                    sendAs;            /* Send as Letter,Enclosure,Image */
  207.     Byte                        padByte;
  208.     SMPEnclosureDescriptorPtr    enclosures;        /* files to be enclosed */
  209.     SMPDrawImageProcPtr            drawImageProc;    /* For imaging */
  210.     long                        imageRefCon;    /* For imaging */
  211.     Boolean                        supportsColor;    /* For imaging - set to true if you application supports color imaging */
  212. };
  213. #if defined(powerc) || defined(__powerc)
  214. #pragma options align=reset
  215. #endif
  216.  
  217. typedef struct SMPLetterPB SMPLetterPB;
  218.  
  219. typedef SMPLetterPB *SMPLetterPBPtr;
  220.  
  221. enum  {
  222.     kSMPAppMustHandleEventBit,
  223.     kSMPAppShouldIgnoreEventBit,
  224.     kSMPContractedBit,
  225.     kSMPExpandedBit,
  226.     kSMPMailerBecomesTargetBit,
  227.     kSMPAppBecomesTargetBit,
  228.     kSMPCursorOverMailerBit,
  229.     kSMPCreateCopyWindowBit,
  230.     kSMPDisposeCopyWindowBit
  231. };
  232.  
  233. /* Values of SMPMailerResult */
  234. enum  {
  235.     kSMPAppMustHandleEventMask        = 1 << kSMPAppMustHandleEventBit,
  236.     kSMPAppShouldIgnoreEventMask     = 1 << kSMPAppShouldIgnoreEventBit,
  237.     kSMPContractedMask                = 1 << kSMPContractedBit,
  238.     kSMPExpandedMask                = 1 << kSMPExpandedBit,
  239.     kSMPMailerBecomesTargetMask        = 1 << kSMPMailerBecomesTargetBit,
  240.     kSMPAppBecomesTargetMask        = 1 << kSMPAppBecomesTargetBit,
  241.     kSMPCursorOverMailerMask        = 1 << kSMPCursorOverMailerBit,
  242.     kSMPCreateCopyWindowMask        = 1 << kSMPCreateCopyWindowBit,
  243.     kSMPDisposeCopyWindowMask        = 1 << kSMPDisposeCopyWindowBit
  244. };
  245.  
  246. typedef unsigned long SMPMailerResult;
  247.  
  248. /* Values of SMPMailerComponent*/
  249. enum  {
  250.     kSMPOther                    = -1,
  251.     kSMPFrom                    = 32,
  252.     kSMPTo                        = 20,
  253.     kSMPRegarding                = 22,
  254.     kSMPSendDateTime            = 29,
  255.     kSMPAttachments                = 26,
  256.     kSMPAddressOMatic            = 16
  257. };
  258.  
  259. typedef unsigned long SMPMailerComponent;
  260.  
  261. enum  {
  262.     kSMPToAddress                = kMailToBit,
  263.     kSMPCCAddress                = kMailCcBit,
  264.     kSMPBCCAddress                = kMailBccBit
  265. };
  266.  
  267. typedef MailAttributeID SMPAddressType;
  268.  
  269. enum  {
  270.     kSMPUndoCommand,
  271.     kSMPCutCommand,
  272.     kSMPCopyCommand,
  273.     kSMPPasteCommand,
  274.     kSMPClearCommand,
  275.     kSMPSelectAllCommand
  276. };
  277.  
  278. typedef unsigned short SMPEditCommand;
  279.  
  280. enum  {
  281.     kSMPUndoDisabled,
  282.     kSMPAppMayUndo,
  283.     kSMPMailerUndo
  284. };
  285.  
  286. typedef unsigned short SMPUndoState;
  287.  
  288. /*
  289. SMPSendFormatMask:
  290.  
  291. Bitfield indicating which combinations of formats are included in,
  292. should be included or, or can be included in a letter.
  293. */
  294.         
  295. enum  {
  296.     kSMPNativeBit,
  297.     kSMPImageBit,
  298.     kSMPStandardInterchangeBit
  299. };
  300.  
  301. /* Values of SMPSendFormatMask */
  302. enum  {
  303.     kSMPNativeMask                = 1 << kSMPNativeBit,
  304.     kSMPImageMask                = 1 << kSMPImageBit,
  305.     kSMPStandardInterchangeMask    = 1 << kSMPStandardInterchangeBit
  306. };
  307.  
  308. typedef unsigned long SMPSendFormatMask;
  309.  
  310. /*
  311.     Pseudo-events passed to the clients filter proc for initialization and cleanup.
  312. */ 
  313. enum  {
  314.     kSMPSendOptionsStart        = -1,
  315.     kSMPSendOptionsEnd            = -2
  316. };
  317.  
  318. /*
  319. SMPSendFormatMask:
  320.  
  321. Structure describing the format of a letter.  If kSMPNativeMask bit is set, the whichNativeFormat field indicates which of the client-defined formats to use.
  322. */
  323.         
  324. #if defined(powerc) || defined (__powerc)
  325. #pragma options align=mac68k
  326. #endif
  327. struct SMPSendFormat {
  328.     SMPSendFormatMask            whichFormats;
  329.     short                        whichNativeFormat;    /* 0 based */
  330. };
  331. #if defined(powerc) || defined(__powerc)
  332. #pragma options align=reset
  333. #endif
  334.  
  335. typedef struct SMPSendFormat SMPSendFormat;
  336.  
  337. #if defined(powerc) || defined (__powerc)
  338. #pragma options align=mac68k
  339. #endif
  340. struct SMPLetterInfo {
  341.     OSType                        letterCreator;
  342.     OSType                        letterType;
  343.     RString32                    subject;
  344.     RString32                    sender;
  345. };
  346. #if defined(powerc) || defined(__powerc)
  347. #pragma options align=reset
  348. #endif
  349.  
  350. typedef struct SMPLetterInfo SMPLetterInfo;
  351.  
  352. enum  {
  353.     kSMPSave,
  354.     kSMPSaveAs,
  355.     kSMPSaveACopy
  356. };
  357.  
  358. typedef unsigned short SMPSaveType;
  359.  
  360. typedef pascal WindowPtr (*FrontWindowProcPtr)(long clientData);
  361.  
  362. enum {
  363.     uppFrontWindowProcInfo = kPascalStackBased
  364.          | RESULT_SIZE(SIZE_CODE(sizeof(WindowPtr)))
  365.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  366. };
  367.  
  368. #if USESROUTINEDESCRIPTORS
  369. typedef UniversalProcPtr FrontWindowUPP;
  370.  
  371. #define CallFrontWindowProc(userRoutine, clientData)        \
  372.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppFrontWindowProcInfo, (clientData))
  373. #define NewFrontWindowProc(userRoutine)        \
  374.         (FrontWindowUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppFrontWindowProcInfo, GetCurrentISA())
  375. #else
  376. typedef FrontWindowProcPtr FrontWindowUPP;
  377.  
  378. #define CallFrontWindowProc(userRoutine, clientData)        \
  379.         (*(userRoutine))((clientData))
  380. #define NewFrontWindowProc(userRoutine)        \
  381.         (FrontWindowUPP)(userRoutine)
  382. #endif
  383.  
  384. typedef pascal void (*PrepareMailerForDrawingProcPtr)(WindowPtr window, long clientData);
  385.  
  386. enum {
  387.     uppPrepareMailerForDrawingProcInfo = kPascalStackBased
  388.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(WindowPtr)))
  389.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  390. };
  391.  
  392. #if USESROUTINEDESCRIPTORS
  393. typedef UniversalProcPtr PrepareMailerForDrawingUPP;
  394.  
  395. #define CallPrepareMailerForDrawingProc(userRoutine, window, clientData)        \
  396.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppPrepareMailerForDrawingProcInfo, (window), (clientData))
  397. #define NewPrepareMailerForDrawingProc(userRoutine)        \
  398.         (PrepareMailerForDrawingUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPrepareMailerForDrawingProcInfo, GetCurrentISA())
  399. #else
  400. typedef PrepareMailerForDrawingProcPtr PrepareMailerForDrawingUPP;
  401.  
  402. #define CallPrepareMailerForDrawingProc(userRoutine, window, clientData)        \
  403.         (*(userRoutine))((window), (clientData))
  404. #define NewPrepareMailerForDrawingProc(userRoutine)        \
  405.         (PrepareMailerForDrawingUPP)(userRoutine)
  406. #endif
  407.  
  408. typedef pascal Boolean (*SendOptionsFilterProcPtr)(DialogPtr theDialog, EventRecord *theEvent, short itemHit, long clientData);
  409.  
  410. enum {
  411.     uppSendOptionsFilterProcInfo = kPascalStackBased
  412.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  413.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DialogPtr)))
  414.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(EventRecord*)))
  415.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short)))
  416.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  417. };
  418.  
  419. #if USESROUTINEDESCRIPTORS
  420. typedef UniversalProcPtr SendOptionsFilterUPP;
  421.  
  422. #define CallSendOptionsFilterProc(userRoutine, theDialog, theEvent, itemHit, clientData)        \
  423.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSendOptionsFilterProcInfo, (theDialog), (theEvent), (itemHit), (clientData))
  424. #define NewSendOptionsFilterProc(userRoutine)        \
  425.         (SendOptionsFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSendOptionsFilterProcInfo, GetCurrentISA())
  426. #else
  427. typedef SendOptionsFilterProcPtr SendOptionsFilterUPP;
  428.  
  429. #define CallSendOptionsFilterProc(userRoutine, theDialog, theEvent, itemHit, clientData)        \
  430.         (*(userRoutine))((theDialog), (theEvent), (itemHit), (clientData))
  431. #define NewSendOptionsFilterProc(userRoutine)        \
  432.         (SendOptionsFilterUPP)(userRoutine)
  433. #endif
  434.  
  435. typedef SendOptionsFilterUPP SendOptionsFilterProc;
  436.  
  437. #define kSMPGetDimensions 4700
  438.  
  439. #define kSMPNewMailer 4701
  440.  
  441. #define kSMPDisposeMailer 4702
  442.  
  443. #define kSMPMailerEvent 4703
  444.  
  445. #define kSMPMailerEditCommand 4704
  446.  
  447. #define kSMPMailerForward 4705
  448.  
  449. #define kSMPMailerReply 4706
  450.  
  451. #define kSMPGetMailerState 4707
  452.  
  453. #define kSMPPrepareCoverPages 4708
  454.  
  455. #define kSMPDrawNthCoverPage 4709
  456.  
  457. #define kSMPBeginSave 4710
  458.  
  459. #define kSMPBeginSend 4711
  460.  
  461. #define kSMPOpenLetter 4712
  462.  
  463. #define kSMPDrawMailer 4713
  464.  
  465. #define kSMPMoveMailer 4714
  466.  
  467. #define kSMPSetSubject 4715
  468.  
  469. #define kSMPSetFromIdentity 4716
  470.  
  471. #define kSMPAddAddress 4717
  472.  
  473. #define kSMPAddAttachment 4718
  474.  
  475. #define kSMPContentChanged 4719
  476.  
  477. #define kSMPEndSave 4720
  478.  
  479. #define kSMPEndSend 4721
  480.  
  481. #define kSMPExpandOrContract 4722
  482.  
  483. #define kSMPBecomeTarget 4723
  484.  
  485. #define kSMPGetTabInfo 4724
  486.  
  487. #define kSMPClearUndo 4725
  488.  
  489. #define kSMPAttachDialog 4726
  490.  
  491. #define kSMPGetComponentSize 4727
  492.  
  493. #define kSMPGetComponentInfo 4728
  494.  
  495. #define kSMPGetListItemInfo 4729
  496.  
  497. #define kSMPAddContent 4730
  498.  
  499. #define kSMPReadContent 4731
  500.  
  501. #define kSMPGetFontNameFromLetter 4732
  502.  
  503. #define kSMPAddMainEnclosure 4733
  504.  
  505. #define kSMPGetMainEnclosureFSSpec 4734
  506.  
  507. #define kSMPAddBlock 4735
  508.  
  509. #define kSMPReadBlock 4736
  510.  
  511. #define kSMPEnumerateBlocks 4737
  512.  
  513. #define kSMPImage 4738
  514.  
  515. #define kSMPInitMailer 4741
  516.  
  517. #define kSMPGetNextLetter 4742
  518.  
  519. #define kSMPPrepareToClose 4743
  520.  
  521. #define kSMPCloseOptionsDialog 4744
  522.  
  523. #define kSMPPrepareToChange 4745
  524.  
  525. #define kSMPGetLetterInfo 4746
  526.  
  527. #define kSMPTagDialog 4747
  528.  
  529. #define kSMPSendOptionsDialog 5000
  530.  
  531. #if defined(powerc) || defined (__powerc)
  532. #pragma options align=mac68k
  533. #endif
  534. struct SMPMailerState {
  535.     short                        mailerCount;
  536.     short                        currentMailer;
  537.     Point                        upperLeft;
  538.     Boolean                        hasBeenReceived;
  539.     Boolean                        isTarget;
  540.     Boolean                        isExpanded;
  541.     Boolean                        canMoveToTrash;
  542.     Boolean                        canTag;
  543.     Byte                        padByte2;
  544.     unsigned long                changeCount;
  545.     SMPMailerComponent            targetComponent;
  546.     Boolean                        canCut;
  547.     Boolean                        canCopy;
  548.     Boolean                        canPaste;
  549.     Boolean                        canClear;
  550.     Boolean                        canSelectAll;
  551.     Byte                        padByte3;
  552.     SMPUndoState                undoState;
  553.     Str63                        undoWhat;
  554. };
  555. #if defined(powerc) || defined(__powerc)
  556. #pragma options align=reset
  557. #endif
  558.  
  559. typedef struct SMPMailerState SMPMailerState;
  560.  
  561. #if defined(powerc) || defined (__powerc)
  562. #pragma options align=mac68k
  563. #endif
  564. struct SMPSendOptions {
  565.     Boolean                        signWhenSent;
  566.     IPMPriority                    priority;
  567. };
  568. #if defined(powerc) || defined(__powerc)
  569. #pragma options align=reset
  570. #endif
  571.  
  572. typedef struct SMPSendOptions SMPSendOptions;
  573.  
  574. typedef SMPSendOptions *SMPSendOptionsPtr, **SMPSendOptionsHandle;
  575.  
  576. #if defined(powerc) || defined (__powerc)
  577. #pragma options align=mac68k
  578. #endif
  579. struct SMPCloseOptions {
  580.     Boolean                        moveToTrash;
  581.     Boolean                        addTag;
  582.     RString32                    tag;
  583. };
  584. #if defined(powerc) || defined(__powerc)
  585. #pragma options align=reset
  586. #endif
  587.  
  588. typedef struct SMPCloseOptions SMPCloseOptions;
  589. typedef SMPCloseOptions *SMPCloseOptionsPtr;
  590.  
  591. /*----------------------------------------------------------------------------------------
  592.     Send Package Routines
  593. ----------------------------------------------------------------------------------------*/
  594. #define __SMPSendLetter(count, selector) = { 0x203C, count, selector, 0xAA5D}
  595. #define __SMPImage(count, selector) = { 0x203C, count, selector, 0xAA5D}
  596. #define __SMPResolve(count, selector) = { 0x203C, count, selector, 0xAA5D}
  597. #define __SMPMailer(count, selector) = { 0x203C, count, selector, 0xAA5D}
  598.  
  599. #define kSMPSendLetter 500
  600. #define kSMPResolveToRecipient 1100
  601.  
  602. #define kSMPNewPage 2100
  603. #define kSMPImageErr 2101
  604.  
  605. #ifdef __cplusplus
  606. extern "C" {
  607. #endif
  608.  
  609. extern pascal OSErr SMPSendLetter(SMPLetterPBPtr theLetter)
  610.  FOURWORDINLINE(0x203C, 2, 500, 0xAA5D);
  611. extern pascal OSErr SMPNewPage(OpenCPicParams *newHeader)
  612.  FOURWORDINLINE(0x203C, 2, 2100, 0xAA5D);
  613. extern pascal OSErr SMPImageErr(void)
  614.  FOURWORDINLINE(0x203C, 0, 2101, 0xAA5D);
  615. extern pascal OSErr SMPResolveToRecipient(PackedDSSpecPtr dsSpec, SMPRecipientDescriptorPtr *recipientList, AuthIdentity identity)
  616.  FOURWORDINLINE(0x203C, 6, 1100, 0xAA5D);
  617. extern pascal OSErr SMPInitMailer(long mailerVersion)
  618.  FOURWORDINLINE(0x203C, 2, 4741, 0xAA5D);
  619. extern pascal OSErr SMPGetDimensions(short *width, short *contractedHeight, short *expandedHeight)
  620.  FOURWORDINLINE(0x203C, 6, 4700, 0xAA5D);
  621. extern pascal OSErr SMPGetTabInfo(SMPMailerComponent *firstTab, SMPMailerComponent *lastTab)
  622.  FOURWORDINLINE(0x203C, 4, 4724, 0xAA5D);
  623. extern pascal OSErr SMPNewMailer(WindowPtr window, Point upperLeft, Boolean canContract, Boolean initiallyExpanded, AuthIdentity identity, const PrepareMailerForDrawingUPP prepareMailerForDrawingCB, long clientData)
  624.  FOURWORDINLINE(0x203C, 12, 4701, 0xAA5D);
  625. extern pascal OSErr SMPPrepareToClose(WindowPtr window)
  626.  FOURWORDINLINE(0x203C, 2, 4743, 0xAA5D);
  627. extern pascal OSErr SMPCloseOptionsDialog(WindowPtr window, SMPCloseOptionsPtr closeOptions)
  628.  FOURWORDINLINE(0x203C, 4, 4744, 0xAA5D);
  629. extern pascal OSErr SMPTagDialog(WindowPtr window, RString32 *theTag)
  630.  FOURWORDINLINE(0x203C, 4, 4747, 0xAA5D);
  631. extern pascal OSErr SMPDisposeMailer(WindowPtr window, SMPCloseOptionsPtr closeOptions)
  632.  FOURWORDINLINE(0x203C, 4, 4702, 0xAA5D);
  633. extern pascal OSErr SMPMailerEvent(const EventRecord *event, SMPMailerResult *whatHappened, const FrontWindowUPP frontWindowCB, long clientData)
  634.  FOURWORDINLINE(0x203C, 8, 4703, 0xAA5D);
  635. extern pascal OSErr SMPClearUndo(WindowPtr window)
  636.  FOURWORDINLINE(0x203C, 2, 4725, 0xAA5D);
  637. extern pascal OSErr SMPMailerEditCommand(WindowPtr window, SMPEditCommand command, SMPMailerResult *whatHappened)
  638.  FOURWORDINLINE(0x203C, 5, 4704, 0xAA5D);
  639. extern pascal OSErr SMPMailerForward(WindowPtr window, AuthIdentity from)
  640.  FOURWORDINLINE(0x203C, 4, 4705, 0xAA5D);
  641. extern pascal OSErr SMPMailerReply(WindowPtr originalLetter, WindowPtr newLetter, Boolean replyToAll, Point upperLeft, Boolean canContract, Boolean initiallyExpanded, AuthIdentity identity, const PrepareMailerForDrawingUPP prepareMailerForDrawingCB, long clientData)
  642.  FOURWORDINLINE(0x203C, 15, 4706, 0xAA5D);
  643. extern pascal OSErr SMPGetMailerState(WindowPtr window, SMPMailerState *itsState)
  644.  FOURWORDINLINE(0x203C, 4, 4707, 0xAA5D);
  645. extern pascal OSErr SMPSendOptionsDialog(WindowPtr window, Str255 documentName, StringPtr nativeFormatNames[], unsigned short nameCount, SMPSendFormatMask canSend, SMPSendFormat *currentFormat, SendOptionsFilterProc filterProc, long clientData, SMPSendFormat *shouldSend, SMPSendOptionsPtr sendOptions)
  646.  FOURWORDINLINE(0x203C, 19, 5000, 0xAA5D);
  647. extern pascal OSErr SMPPrepareCoverPages(WindowPtr window, short *pageCount)
  648.  FOURWORDINLINE(0x203C, 4, 4708, 0xAA5D);
  649. extern pascal OSErr SMPDrawNthCoverPage(WindowPtr window, short pageNumber, Boolean doneDrawingCoverPages)
  650.  FOURWORDINLINE(0x203C, 4, 4709, 0xAA5D);
  651. extern pascal OSErr SMPPrepareToChange(WindowPtr window)
  652.  FOURWORDINLINE(0x203C, 2, 4745, 0xAA5D);
  653. extern pascal OSErr SMPContentChanged(WindowPtr window)
  654.  FOURWORDINLINE(0x203C, 2, 4719, 0xAA5D);
  655. extern pascal OSErr SMPBeginSave(WindowPtr window, const FSSpec *diskLetter, OSType creator, OSType fileType, SMPSaveType saveType, Boolean *mustAddContent)
  656.  FOURWORDINLINE(0x203C, 11, 4710, 0xAA5D);
  657. extern pascal OSErr SMPEndSave(WindowPtr window, Boolean okToSave)
  658.  FOURWORDINLINE(0x203C, 3, 4720, 0xAA5D);
  659. extern pascal OSErr SMPBeginSend(WindowPtr window, OSType creator, OSType fileType, SMPSendOptionsPtr sendOptions, Boolean *mustAddContent)
  660.  FOURWORDINLINE(0x203C, 10, 4711, 0xAA5D);
  661. extern pascal OSErr SMPEndSend(WindowPtr window, Boolean okToSend)
  662.  FOURWORDINLINE(0x203C, 3, 4721, 0xAA5D);
  663. extern pascal OSErr SMPOpenLetter(const LetterDescriptor *letter, WindowPtr window, Point upperLeft, Boolean canContract, Boolean initiallyExpanded, const PrepareMailerForDrawingUPP prepareMailerForDrawingCB, long clientData)
  664.  FOURWORDINLINE(0x203C, 12, 4712, 0xAA5D);
  665. extern pascal OSErr SMPAddMainEnclosure(WindowPtr window, const FSSpec *enclosure)
  666.  FOURWORDINLINE(0x203C, 4, 4733, 0xAA5D);
  667. extern pascal OSErr SMPGetMainEnclosureFSSpec(WindowPtr window, FSSpec *enclosureDir)
  668.  FOURWORDINLINE(0x203C, 4, 4734, 0xAA5D);
  669. extern pascal OSErr SMPAddContent(WindowPtr window, MailSegmentType segmentType, Boolean appendFlag, void *buffer, unsigned long bufferSize, StScrpRec *textScrap, Boolean startNewScript, ScriptCode script)
  670.  FOURWORDINLINE(0x203C, 12, 4730, 0xAA5D);
  671. extern pascal OSErr SMPReadContent(WindowPtr window, MailSegmentMask segmentTypeMask, void *buffer, unsigned long bufferSize, unsigned long *dataSize, StScrpRec *textScrap, ScriptCode *script, MailSegmentType *segmentType, Boolean *endOfScript, Boolean *endOfSegment, Boolean *endOfContent, long *segmentLength, long *segmentID)
  672.  FOURWORDINLINE(0x203C, 25, 4731, 0xAA5D);
  673. extern pascal OSErr SMPGetFontNameFromLetter(WindowPtr window, short fontNum, Str255 fontName, Boolean doneWithFontTable)
  674.  FOURWORDINLINE(0x203C, 6, 4732, 0xAA5D);
  675. extern pascal OSErr SMPAddBlock(WindowPtr window, const OCECreatorType *blockType, Boolean append, void *buffer, unsigned long bufferSize, MailBlockMode mode, unsigned long offset)
  676.  FOURWORDINLINE(0x203C, 12, 4735, 0xAA5D);
  677. extern pascal OSErr SMPReadBlock(WindowPtr window, const OCECreatorType *blockType, unsigned short blockIndex, void *buffer, unsigned long bufferSize, unsigned long dataOffset, unsigned long *dataSize, Boolean *endOfBlock, unsigned long *remaining)
  678.  FOURWORDINLINE(0x203C, 17, 4736, 0xAA5D);
  679. extern pascal OSErr SMPEnumerateBlocks(WindowPtr window, unsigned short startIndex, void *buffer, unsigned long bufferSize, unsigned long *dataSize, unsigned short *nextIndex, Boolean *more)
  680.  FOURWORDINLINE(0x203C, 13, 4737, 0xAA5D);
  681. extern pascal OSErr SMPDrawMailer(WindowPtr window)
  682.  FOURWORDINLINE(0x203C, 2, 4713, 0xAA5D);
  683. extern pascal OSErr SMPSetSubject(WindowPtr window, const RString *text)
  684.  FOURWORDINLINE(0x203C, 4, 4715, 0xAA5D);
  685. extern pascal OSErr SMPSetFromIdentity(WindowPtr window, AuthIdentity from)
  686.  FOURWORDINLINE(0x203C, 4, 4716, 0xAA5D);
  687. extern pascal OSErr SMPAddAddress(WindowPtr window, SMPAddressType addrType, OCEPackedRecipient *address)
  688.  FOURWORDINLINE(0x203C, 5, 4717, 0xAA5D);
  689. extern pascal OSErr SMPAddAttachment(WindowPtr window, const FSSpec *attachment)
  690.  FOURWORDINLINE(0x203C, 4, 4718, 0xAA5D);
  691. extern pascal OSErr SMPAttachDialog(WindowPtr window)
  692.  FOURWORDINLINE(0x203C, 2, 4726, 0xAA5D);
  693. extern pascal OSErr SMPExpandOrContract(WindowPtr window, Boolean expand)
  694.  FOURWORDINLINE(0x203C, 3, 4722, 0xAA5D);
  695. extern pascal OSErr SMPMoveMailer(WindowPtr window, short dh, short dv)
  696.  FOURWORDINLINE(0x203C, 4, 4714, 0xAA5D);
  697. extern pascal OSErr SMPBecomeTarget(WindowPtr window, Boolean becomeTarget, SMPMailerComponent whichField)
  698.  FOURWORDINLINE(0x203C, 5, 4723, 0xAA5D);
  699. extern pascal OSErr SMPGetComponentSize(WindowPtr window, unsigned short whichMailer, SMPMailerComponent whichField, unsigned short *size)
  700.  FOURWORDINLINE(0x203C, 7, 4727, 0xAA5D);
  701. extern pascal OSErr SMPGetComponentInfo(WindowPtr window, unsigned short whichMailer, SMPMailerComponent whichField, void *buffer)
  702.  FOURWORDINLINE(0x203C, 7, 4728, 0xAA5D);
  703. extern pascal OSErr SMPGetListItemInfo(WindowPtr window, unsigned short whichMailer, SMPMailerComponent whichField, void *buffer, unsigned long bufferLength, unsigned short startItem, unsigned short *itemCount, unsigned short *nextItem, Boolean *more)
  704.  FOURWORDINLINE(0x203C, 16, 4729, 0xAA5D);
  705. extern pascal OSErr SMPImage(WindowPtr window, SMPDrawImageUPP drawImageProc, long imageRefCon, Boolean supportsColor)
  706.  FOURWORDINLINE(0x203C, 7, 4738, 0xAA5D);
  707. extern pascal OSErr SMPGetNextLetter(OSType *typesList, short numTypes, LetterDescriptor *adjacentLetter)
  708.  FOURWORDINLINE(0x203C, 5, 4742, 0xAA5D);
  709. extern pascal OSErr SMPGetLetterInfo(LetterSpec *mailboxSpec, SMPLetterInfo *info)
  710.  FOURWORDINLINE(0x203C, 4, 4746, 0xAA5D);
  711. #ifdef __cplusplus
  712. }
  713. #endif
  714.  
  715. #endif
  716.  
  717.